package com.itheima.tcpcom;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class CilentDemo {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",10020);
        byte[] str = "hello".getBytes();
        OutputStream ous = socket.getOutputStream();
        ous.write(str);
        ous.close();
        socket.close();
    }
}
